import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'

/* Router Modules */
// import componentsRouter from './modules/components'
// import chartsRouter from './modules/charts'
// import tableRouter from './modules/table'
// import nestedRouter from './modules/nested'
import ewmRouter from './modules/ewm'
import testingcenter from './modules/testingcenter'
import { assetmanage,consumables } from './modules/assetmanage'

/**
 * 注意：子菜单仅在route children.length>=1时出现
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 * hidden：true如果设置为true，则项目将不会显示在侧边栏中（默认为false）
 * alwaysShow:true如果设置为true，将始终显示根菜单
 * 如果不始终设置Show，则当项具有多个子路由时，
 * 它将成为嵌套模式，否则不显示根菜单
 * redirect：noRedirect 如果设置了no redirect，则noRedirect将不会在breadcrumb中重定向
 * name:'router-name' <keep alive>使用的名称（必须设置！！！）
 * meta：{
    role：['admin'，'editor']控制页面角色（您可以设置多个角色）
    title:“title” 在侧边栏和面包屑中显示的名称（推荐集）
    icon:'svg name' 图标显示在侧栏中
    noCache:true 如果设置为true，则不会缓存该页（默认为false）
    affix：true 如果设置为真，标签将附加在标签视图中
    breadcrumb:false 如果设置为false，则该项将隐藏在breadcrumb中（默认为true）
    activeMenu:'/example/list'如果设置路径，侧边栏将突出显示您设置的路径
   }
 */

/**
 * constantRoutes
 * 没有权限要求的基页
 * 可以访问所有角色
 */
export const constantRoutes = [
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path*',
        component: () => import('@/views/redirect/index')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  {
    path: '/auth-redirect',
    component: () => import('@/views/login/auth-redirect'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/error-page/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/error-page/401'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/dashboard/index'),
        name: 'Dashboard',
        meta: { title: '首页', icon: 'index', affix: true }
      },
      {
        path: 'tobereviewed',
        component: () => import('@/views/dashboard/tobereviewed/index'),
        name: 'Tobereviewed',
        meta: { title: '待审核', activeMenu:'/dashboard'  },
        hidden: true
      },
			{
			  path: 'writeTobeReviewed',
			  component: () => import('@/views/dashboard/tobereviewed/writeTobeReviewed'),
			  name: 'WriteTobeReviewed',
			  meta: { title: '审核详情', activeMenu:'/dashboard' },
			  hidden: true
			},
      {
        path: 'reviewed',
        component: () => import('@/views/dashboard/reviewed/index'),
        name: 'Reviewed',
        meta: { title: '已审核', activeMenu:'/dashboard' },
        hidden: true
      },
			{
			  path: 'lookReviewed',
			  component: () => import('@/views/dashboard/reviewed/lookReviewed'),
			  name: 'LookReviewed',
			  meta: { title: '审核详情', activeMenu:'/dashboard' },
			  hidden: true
			},
			{
			  path: 'approvalRules',
			  component: () => import('@/views/dashboard/approvalRules/index'),
			  name: 'ApprovalRules',
			  meta: { title: '审批规则', activeMenu:'/dashboard' },
			  hidden: true
			},
			{
			  path: 'rejected',
			  component: () => import('@/views/dashboard/rejected/index'),
			  name: 'Rejected',
			  meta: { title: '被驳回', activeMenu:'/dashboard' },
			  hidden: true
			},
    ]
  }
]

/**
 * asyncRoutes
 * 需要根据用户角色动态加载的路由
 */
export const asyncRoutes = [
  {
    path: '/people',
    component: Layout,
    redirect: '/dashboard',
    meta: { title: '人力资源', icon: 'peoples', noCache: true},
    children: [
      {
        path: 'department',
        component: () => import('@/views/people/department/index'),
        name: 'Department',
        meta: { title: '部门管理', noCache: true,roles: ['admin']}
      },
      {
        path: 'personnel',
        component: () => import('@/views/people/personnel-files/index'),
        name: 'Personnel',
        meta: { title: '人员档案', noCache: true,roles: ['admin']}
      },
      {
        path: 'writepersonnel',
        component: () => import('@/views/people/personnel-files/writepersonnel'),
        name: 'Writepersonnel',
        meta: { title: '编辑人员档案', noCache: true,  activeMenu:'/people/personnel',roles: ['admin'] },
        hidden: true
      },
			{
			  path: 'lookpersonnel',
			  component: () => import('@/views/people/personnel-files/lookpersonnel'),
			  name: 'Lookpersonnel',
			  meta: { title: '查看人员档案', noCache: true, activeMenu:'/people/personnel',roles: ['admin'] },
			  hidden: true
			},
      {
        path: 'academic',
        component: () => import('@/views/people/academic-title/index'),
        name: 'Academic',
        meta: { title: '角色管理', noCache: true,roles: ['admin']}
      },
			{
			  path: 'academicWrite',
			  component: () => import('@/views/people/academic-title/academicWrite'),
			  name: 'AcademicWrite',
			  meta: { title: '编辑角色管理', noCache: true, activeMenu:'/people/academic',roles: ['admin'] },
				hidden: true
			},
			{
			  path: 'permission',
			  component: () => import('@/views/people/permission/index'),
			  name: 'Permission',
			  meta: { title: '权限管理', noCache: true,roles: ['admin'] }
      },
      {
			  path: 'video',
			  component: () => import('@/views/people/video/index'),
			  name: 'Video',
			  meta: { title: '视频教程管理', noCache: true }
      },
      {
			  path: 'videoWeb',
			  component: () => import('@/views/people/video/videoWeb'),
			  name: 'VideoWeb',
			  meta: { title: '视频教程', noCache: true }
      },
      {
			  path: 'zhangjie',
			  component: () => import('@/views/people/video/zhangjie/index'),
			  name: 'Zhangjie',
        meta: { title: '课程详情', noCache: true, activeMenu:'/people/videoWeb' },
        hidden: true
      },
      {
			  path: 'zhangjieguanli',
			  component: () => import('@/views/people/video/zhangjie/zhangjieguanli'),
			  name: 'Zhangjieguanli',
        meta: { title: '章节管理', noCache: true, activeMenu:'/people/video' },
        hidden: true
      },
      {
			  path: 'problemtest',
			  component: () => import('@/views/people/video/zhangjie/problemtest'),
			  name: 'Problemtest',
        meta: { title: '测试题管理', noCache: true, activeMenu:'/people/video' },
        hidden: true
      },
      {
			  path: 'kecheng',
			  component: () => import('@/views/people/video/kecheng/index'),
			  name: 'Kecheng',
        meta: { title: '课程管理', noCache: true, activeMenu:'/people/video' },
        hidden: true
      },
      {
			  path: 'kaishiceshi',
			  component: () => import('@/views/people/video/zhangjie/kaishiceshi'),
			  name: 'Kaishiceshi',
        meta: { title: '章节测试', noCache: true, activeMenu:'/people/videoWeb' },
        hidden: true
      },
      {
			  path: 'writekecheng',
			  component: () => import('@/views/people/video/kecheng/writekecheng'),
			  name: 'Writekecheng',
        meta: { title: '编辑课程', noCache: true, activeMenu:'/people/video' },
        hidden: true
      }
    ]
  },
  // {
  //   path: '/icon',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/icons/index'),
  //       name: 'Icons',
  //       meta: { title: 'icons', icon: 'icon', noCache: true }
  //     }
  //   ]
  // },
  /**
	 * 仓库管理路由模块
	 */
  // {
  //   path: '/purchase',
  //   component: Layout,
  //   redirect: '/purchase',
  //   meta: { title: '仓库管理', icon: 'caigou1', noCache: true, roles: ['admin', 'editor']},
  //   children: [
  //     {
  //       path: 'inventoryClass',
  //       component: () => import('@/views/purchase/inventory-class/index'),
  //       name: 'InventoryClass',
  //       meta: { title: '存货分类', noCache: true, roles: ['admin', 'editor'] }
  //     },
  //     {
  //       path: 'inventoryDetails',
  //       component: () => import('@/views/purchase/inventory-details/index'),
  //       name: 'InventoryDetails',
  //       meta: { title: '存货明细表', noCache: true, roles: ['admin', 'editor'] }
  //     }
  //   ]
  // },
  /**
	 * 资产管理路由模块
	 */
  assetmanage,
  /**
   * 耗材管理
   */
  // consumables,
  /**
	 * 采购管理路由模块
	 */
  // {
  //   path: '/procurement',
  //   component: Layout,
  //   redirect: '/dashboard',
  //   meta: { title: '采购管理', icon: 'caigou', noCache: true,roles: ['admin','editor'] },
  //   children: [
  //     {
  //       path: 'supplier',
  //       component: () => import('@/views/procurement/supplier/index'),
  //       name: 'Supplier',
  //       meta: { title: '供应商设置', noCache: true, roles: ['admin', 'editor'] }
  //     },
  //     {
  //       path: 'billofentry',
  //       component: () => import('@/views/procurement/bill-of-entry/index'),
  //       name: 'Billofentry',
  //       meta: { title: '进货单', noCache: true, roles: ['admin', 'editor'] }
  //     },
  //     {
  //       path: 'billofentryWrite',
  //       component: () => import('@/views/procurement/bill-of-entry/billofentryWrite'),
  //       name: 'BillofentryWrite',
  //       meta: { title: '新增进货单', activeMenu:'/procurement/billofentry', roles: ['admin', 'editor'] },
  //       hidden: true
  //     },
  //     {
  //       path: 'sureInstock',
  //       component: () => import('@/views/procurement/bill-of-entry/sureInstock'),
  //       name: 'SureInstock',
  //       meta: { title: '订单详情', activeMenu:'/procurement/billofentry', roles: ['admin', 'editor'] },
  //       hidden: true
  //     }
  //   ]
  // },
  /**
	 * 库存管理路由模块
	 */
  // {
	//   path: '/stock',
	//   component: Layout,
	//   redirect: '/dashboard',
	//   meta: { title: '库存管理', icon: 'caigou1', noCache: true, roles: ['admin', 'editor'] },
	//   children: [
  //     {
  //       path: 'inventoryClass',
  //       component: () => import('@/views/purchase/inventory-class/index'),
  //       name: 'InventoryClass',
  //       meta: { title: '存货分类', noCache: true, roles: ['admin', 'editor'] }
  //     },
  //     {
  //       path: 'inventoryDetails',
  //       component: () => import('@/views/purchase/inventory-details/index'),
  //       name: 'InventoryDetails',
  //       meta: { title: '存货明细表', noCache: true, roles: ['admin', 'editor'] }
  //     },
	// 		{
	// 		  path: 'addproduct',
	// 		  component: () => import('@/views/purchase/inventory-details/addproduct'),
	// 		  name: 'Addproduct',
	// 		  meta: { title: '新增产品', noCache: true,activeMenu:'/stock/inventoryDetails', roles: ['admin', 'editor'] },
	// 			hidden: true
  //     },
  //     {
	// 		  path: 'wanshanproduct',
	// 		  component: () => import('@/views/purchase/inventory-details/wanshanproduct'),
	// 		  name: 'Wanshanproduct',
	// 		  meta: { title: '完善产品', noCache: true,activeMenu:'/stock/inventoryDetails', roles: ['admin', 'editor'] },
	// 			hidden: true
	// 		},
	//     {
	//       path: '/inboundorder',
	//       component: () => import('@/views/stock/inboundorder/index'),
	//       name: 'Inboundorder',
	//       meta: { title: '入库单', noCache: true, roles: ['admin', 'editor'] }
	//     },
  //     {
	// 		  path: '/inboundorderWrite',
	// 		  component: () => import('@/views/stock/inboundorder/inboundorderWrite'),
	// 		  name: 'InboundorderWrite',
	// 		  meta: { title: '编辑入库单', noCache: true, activeMenu:'/inboundorder', roles: ['admin', 'editor']},
  //       hidden: true
  //     },
	//     {
	//       path: '/outboundorder',
	//       component: () => import('@/views/stock/outboundorder/index'),
	//       name: 'Outboundorder',
	//       meta: { title: '出库单', noCache: true, roles: ['admin', 'editor'] }
	//     },
  //     {
	// 		  path: '/outboundorderWrite',
	// 		  component: () => import('@/views/stock/outboundorder/outboundorderWrite'),
	// 		  name: 'OutboundorderWrite',
	// 		  meta: { title: '新增出库单', activeMenu:'/outboundorder', roles: ['admin', 'editor'] },
  //       hidden: true
  //     },
	// 		{
	// 		  path: '/sureOutstock',
	// 		  component: () => import('@/views/stock/outboundorder/sureOutstock'),
	// 		  name: 'Sureoutstock',
	// 		  meta: { title: '确认出库', activeMenu:'/outboundorder', roles: ['admin', 'editor'] },
	// 		  hidden: true
	// 		},
	// 		// {
	// 		//   path: '/pickingorder',
	// 		//   component: () => import('@/views/stock/pickingorder/index'),
	// 		//   name: 'Pickingorder',
	// 		//   meta: { title: '领料列表', noCache: true, roles: ['admin', 'editor'] }
	// 		// },
	// 		// {
	// 		//   path: '/writepicking',
	// 		//   component: () => import('@/views/stock/pickingorder/writepicking'),
	// 		//   name: 'Writepicking',
	// 		//   meta: { title: '编辑领料', noCache: true, roles: ['admin', 'editor'],activeMenu:'/pickingorder' },
	// 		// 	hidden: true
	// 		// },
  //     {
	// 		  path: '/checklist',
	// 		  component: () => import('@/views/stock/checklist/index'),
	// 		  name: 'Checklist',
	// 		  meta: { title: '盘点单', noCache: true, roles: ['admin', 'editor'] }
  //     },
	// 		{
	// 		  path: '/checklistWrite',
	// 		  component: () => import('@/views/stock/checklist/checklistWrite'),
	// 		  name: 'ChecklistWrite',
	// 			hidden: true,
	// 		  meta: { title: '新增盘点单', noCache: true, activeMenu:'/checklist', roles: ['admin', 'editor']}
	// 		},
	//   ]
  // },
  /**
	 * 部门管理路由模块
	 */
  {
	  path: '/department',
	  component: Layout,
    alwaysShow: true,
	  redirect: '/dashboard',
	  meta: { title: '部门管理', icon: 'bumen', noCache: true, roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] },
	  children: [
	    // {
	    //   path: 'devicelist',
	    //   component: () => import('@/views/department/devicelist/index'),
	    //   name: 'Devicelist',
	    //   meta: { title: '设备列表', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian']}
      // },
      // {
	    //   path: 'lookoneclass',
	    //   component: () => import('@/views/department/devicelist/lookoneclass'),
	    //   name: 'Lookoneclass',
      //   meta: { title: '查看详情', noCache: true,activeMenu: '/department/devicelist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] },
      //   hidden: true
      // },
      // {
			//   path: 'repair',
			//   component: () => import('@/views/department/devicelist/repair'),
			//   name: 'Repair',
			//   meta: { title: '设备维修', noCache: true, activeMenu: '/department/devicelist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] },
			// 	hidden: true
			// },
			// {
			//   path: '/wanshan',
			//   component: () => import('@/views/department/devicelist/wanshan'),
			//   name: 'Wanshan',
			//   meta: { title: '完善信息', noCache: true, activeMenu:'/department/devicelist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] },
			// 	hidden: true
			// },
			// {
			//   path: 'writedevicelist',
			//   component: () => import('@/views/department/devicelist/writedevicelist'),
			//   name: 'Writedevicelist',
			//   meta: { title: '编辑设备', noCache: true, activeMenu:'/department/devicelist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian']},
			// 	hidden: true
      // },
      // {
			//   path: 'lookchildren',
			//   component: () => import('@/views/department/devicelist/lookchildren'),
			//   name: 'Lookchildren',
			//   meta: { title: '子设备', noCache: true, activeMenu:'/department/devicelist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian']},
			// 	hidden: true
      // }, 
      // {
	    //   path: 'electricallist',
	    //   component: () => import('@/views/department/electricallist/index'),
	    //   name: 'Electricallist',
      //   meta: { title: '电器列表', noCache: true, roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] }
      // },
      // {
	    //   path: 'lookEleOneclass',
	    //   component: () => import('@/views/department/electricallist/lookEleOneclass'),
	    //   name: 'LookEleOneclass',
      //   meta: { title: '查看电器详情', noCache: true,activeMenu: '/department/electricallist', roles: ['dfAdmin','dfEditor', 'dfZongjian','dfChejian'] },
      //   hidden: true
      // },
      // {
	    //   path: 'lookElechildren',
	    //   component: () => import('@/views/department/electricallist/lookElechildren'),
	    //   name: 'LookElechildren',
      //   meta: { title: '查看子电器', noCache: true,activeMenu: '/department/electricallist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] },
      //   hidden: true
      // },
      // {
	    //   path: 'repairEle',
	    //   component: () => import('@/views/department/electricallist/repairEle'),
	    //   name: 'RepairEle',
      //   meta: { title: '电器维修', noCache: true,activeMenu: '/department/electricallist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] },
      //   hidden: true
      // },
      // {
	    //   path: 'wanshanEle',
	    //   component: () => import('@/views/department/electricallist/wanshanEle'),
	    //   name: 'WanshanEle',
      //   meta: { title: '电器完善', noCache: true,activeMenu: '/department/electricallist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian']  },
      //   hidden: true
      // },
      // {
	    //   path: 'writeEleList',
	    //   component: () => import('@/views/department/electricallist/writeEleList'),
	    //   name: 'WriteEleList',
      //   meta: { title: '添加子电器', noCache: true, activeMenu: '/department/electricallist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian']  },
      //   hidden: true
      // },
      // {
	    //   path: 'instrumentlist',
	    //   component: () => import('@/views/department/instrumentlist/index'),
	    //   name: 'Instrumentlist',
      //   meta: { title: '仪表列表', noCache: true, roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian']  }
      // },
      // {
	    //   path: 'writeinstrument',
	    //   component: () => import('@/views/department/instrumentlist/writeinstrument'),
	    //   name: 'Writeinstrument',
      //   meta: { title: '编辑仪表', noCache: true, activeMenu: '/department/instrumentlist', roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] },
      //   hidden: true
      // },
      // {
	    //   path: 'alldevicelist',
	    //   component: () => import('@/views/department/alldevicelist/index'),
	    //   name: 'Alldevicelist',
	    //   meta: { title: '所有设备列表', noCache: true, roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] }
      // },
      {
	      path: 'lingyongxinxi',
	      component: () => import('@/views/department/lingyongxinxi/index'),
	      name: 'Lingyongxinxi',
	      meta: { title: '领用退库', noCache: true, roles: ['dfAdmin','dfZongjian','dfEditor','dfChejian'] }
      },
      {
	      path: 'bumenlingyong',
	      component: () => import('@/views/department/lingyongxinxi/bumenlingyong'),
	      name: 'Bumenlingyong',
        meta: { title: '编辑领用', noCache: true, roles: ['dfAdmin','dfEditor','dfChejian'],activeMenu:'/department/lingyongxinxi' },
        hidden:true
      },
      {
	      path: 'bumentuiku',
	      component: () => import('@/views/department/lingyongxinxi/bumentuiku'),
	      name: 'Bumentuiku',
        meta: { title: '编辑退库', noCache: true, roles: ['dfAdmin','dfEditor','dfChejian'],activeMenu:'/department/lingyongxinxi' },
        hidden:true
      },
      {
	      path: 'weixiugongzichan',
	      component: () => import('@/views/department/weixiugongzichan/index'),
	      name: 'Weixiugongzichan',
	      meta: { title: '各部门资产', noCache: true, roles: ['dfEditor'] }
      },
      {
	      path: 'writeweixiugongzichan',
	      component: () => import('@/views/department/weixiugongzichan/writeweixiugongzichan'),
	      name: 'Writeweixiugongzichan',
        meta: { title: '编辑各部门资产', noCache: true, roles: ['dfEditor'] },
        hidden: true
      },
      {
	      path: 'bumenzichan',
	      component: () => import('@/views/department/bumenzichan/index'),
	      name: 'Bumenzichan',
	      meta: { title: '部门资产', noCache: true, roles: ['dfAdmin','dfZongjian','dfChejian'] }
      },
      {
	      path: 'writebumenzichan',
	      component: () => import('@/views/department/bumenzichan/writebumenzichan'),
	      name: 'Writebumenzichan',
        meta: { title: '编辑部门资产', noCache: true,activeMenu:'/department/bumenzichan', roles: ['dfAdmin','dfZongjian','dfChejian'] },
        hidden:true
      },
      {
	      path: 'bumenhaocai',
	      component: () => import('@/views/department/bumenhaocai/index'),
	      name: 'Bumenhaocai',
	      meta: { title: '部门耗材', noCache: true, roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] }
      },
      {
	      path: 'jiechuguihuan',
	      component: () => import('@/views/department/jiechuguihuan/index'),
	      name: 'Jiechuguihuan',
	      meta: { title: '借用归还', noCache: true, roles: ['dfAdmin','dfEditor','dfZongjian','dfChejian'] }
      },
      {
	      path: 'writejiechuguihuan',
	      component: () => import('@/views/department/jiechuguihuan/writejiechuguihuan'),
	      name: 'Writejiechuguihuan',
        meta: { title: '编辑借用归还', noCache: true,activeMenu: '/department/jiechuguihuan', roles: ['dfAdmin','dfEditor','dfChejian'] },
        hidden: true
      },
      {
	      path: 'bumendengdaixunjian',
	      component: () => import('@/views/department/bumendengdaixunjian/index'),
	      name: 'Bumendengdaixunjian',
	      meta: { title: '等待保养', noCache: true, roles: ['dfAdmin','dfZongjian','dfChejian'] }
      },
      {
	      path: 'daipingjia',
	      component: () => import('@/views/department/daipingjia/index'),
	      name: 'Daipingjia',
	      meta: { title: '等待评价', noCache: true, roles: ['dfAdmin','dfZongjian','dfChejian'] }
      },
      {
	      path: 'daiweixiu',
	      component: () => import('@/views/department/daiweixiu/index'),
	      name: 'Daiweixiu',
	      meta: { title: '等待维修', noCache: true, roles: ['dfAdmin','dfZongjian','dfChejian'] }
      },
      {
	      path: 'yibaoxiu',
	      component: () => import('@/views/department/yibaoxiu/index'),
	      name: 'Yibaoxiu',
	      meta: { title: '已报修', noCache: true, roles: ['dfAdmin','dfZongjian','dfChejian'] }
      },
      {
	      path: 'weixiugongjilu',
	      component: () => import('@/views/department/weixiugongjilu/index'),
	      name: 'Weixiugongjilu',
	      meta: { title: '设备维修记录', noCache: true, roles: ['dfEditor'] }
      },
      {
	      path: 'writeweixiugongjilu',
	      component: () => import('@/views/department/weixiugongjilu/writeweixiugongjilu'),
	      name: 'Writeweixiugongjilu',
        meta: { title: '编辑维修工设备维修', noCache: true, roles: ['dfEditor'],activeMenu: '/department/weixiugongjilu' },
        hidden: true
      },
      {
	      path: 'weixiugongdaiweixiu',
	      component: () => import('@/views/department/weixiugong/weixiugongdaiweixiu'),
	      name: 'Weixiugongdaiweixiu',
	      meta: { title: '维修工待维修', noCache: true, roles: ['dfEditor'] }
      },
      {
	      path: 'weixiugongdaipingjia',
	      component: () => import('@/views/department/weixiugong/weixiugongdaipingjia'),
	      name: 'Weixiugongdaipingjia',
	      meta: { title: '维修工待评价', noCache: true, roles: ['dfEditor'] }
      },
      {
	      path: 'weixiugongyibaoxiu',
	      component: () => import('@/views/department/weixiugong/weixiugongyibaoxiu'),
	      name: 'Weixiugongyibaoxiu',
	      meta: { title: '维修工已报修', noCache: true, roles: ['dfEditor'] }
      },
      {
	      path: 'weixiugongdaixunjian',
	      component: () => import('@/views/department/weixiugong/weixiugongdaixunjian'),
	      name: 'Weixiugongdaixunjian',
	      meta: { title: '维修工待保养', noCache: true, roles: ['dfEditor'] }
      },
      {
	      path: 'bumenshebeiweixiu',
	      component: () => import('@/views/department/weixiu/index'),
	      name: 'Bumenshebeiweixiu',
	      meta: { title: '设备维修', noCache: true, roles: ['dfAdmin','dfZongjian','dfChejian'] }
      },
      {
	      path: 'writebumenshebeiweixiu',
	      component: () => import('@/views/department/weixiu/writeweixiu'),
	      name: 'Writebumenshebeiweixiu',
        meta: { title: '编辑设备维修', noCache: true,activeMenu: '/department/bumenshebeiweixiu', roles: ['dfAdmin','dfEditor','dfChejian'] },
        hidden: true
      },
      {
	      path: 'haocailingyong',
	      component: () => import('@/views/department/haocaichuku/index'),
	      name: 'Haocailingyong',
        meta: { title: '耗材领用', noCache: true, roles: ['dfAdmin','dfZongjian','dfEditor','dfChejian'] },
        hidden: true
      },
      {
	      path: 'writehaocailingyong',
	      component: () => import('@/views/department/haocaichuku/writehaocaichuku'),
	      name: 'Writehaocailingyong',
        meta: { title: '编辑耗材领用', noCache: true,activeMenu:'/department/lingyongxinxi', roles: ['dfAdmin','dfEditor','dfChejian'] },
        hidden: true
      },
      {
	      path: 'haocaituihuan',
	      component: () => import('@/views/department/haocairuku/index'),
	      name: 'Haocaituihuan',
        meta: { title: '耗材退还', noCache: true, roles: ['dfAdmin','dfZongjian','dfEditor','dfChejian'] },
        hidden: true
      },
      {
	      path: 'writehaocaituihuan',
	      component: () => import('@/views/department/haocairuku/writehaocairuku'),
	      name: 'Writehaocaituihuan',
        meta: { title: '编辑耗材退还', noCache: true,activeMenu:'/department/lingyongxinxi', roles: ['dfAdmin','dfEditor','dfChejian'] },
        hidden: true
      },
      {
	      path: 'writebumenshebeiweixiu',
	      component: () => import('@/views/department/weixiu/writeweixiu'),
	      name: 'Writebumenshebeiweixiu',
        meta: { title: '编辑部门设备维修', noCache: true,activeMenu: '/department/bumenshebeiweixiu', roles: ['dfAdmin','dfEditor','dfChejian'] },
        hidden: true
      },
      // {
			//   path: '/pickinglist',
			//   component: () => import('@/views/department/pickinglist/index'),
			//   name: 'Pickingorder',
			//   meta: { title: '领料列表', noCache: true, roles: ['admin', 'editor'] }
      // },
      // {
			//   path: '/writepickinglist',
			//   component: () => import('@/views/department/pickinglist/writepickinglist'),
			//   name: 'Writepickinglist',
			//   meta: { title: '编辑领料', noCache: true, roles: ['admin', 'editor'],activeMenu:'/pickinglist' },
			// 	hidden: true
			// },
			// {
			//   path: '/repairdeclare',
			//   component: () => import('@/views/department/repairdeclare/index'),
			//   name: 'Repairdeclare',
			//   meta: { title: '设备维修申请', noCache: true,  roles: ['dfAdmin', 'dfEditor'] }
      // },
      // {
			//   path: '/writeRepairdeclare',
			//   component: () => import('@/views/department/repairdeclare/writeRepairdeclare'),
			//   name: 'WriteRepairdeclare',
      //   meta: { title: '编辑维修申请', noCache: true,activeMenu:'/repairdeclare', roles: ['dfAdmin', 'dfEditor'] },
      //   hidden: true
			// }
	  ]
  },
  {
	  path: '/department',
	  component: Layout,
    alwaysShow: true,
    meta: { title: '资产明细', noCache: true },
    hidden: true,
    children: [
      {
        path: '/zichanmingxi',
        component: () => import('@/views/assetmanage/zichanmingxi/index'),
        name: 'Zichanmingxi',
        meta: { title: '资产明细', noCache: true },
        hidden: true
      }
    ]
  },
  // {
  //   path: '/zichanmingxi',
  //   component: () => import('@/views/assetmanage/zichanmingxi/index'),
  //   name: 'Zichanmingxi',
  //   meta: { title: '资产明细', noCache: true },
  //   hidden: true
  // },
  
  /**
	 * 报表查询路由模块
	 */
  // {
	//   path: 'purchasereport',
	//   component: Layout,
	//   redirect: '/purchasereport',
	//   meta: { title: '报表查询', icon: 'baobiao', noCache: true,roles: ['admin', 'editor'] },
	//   children: [
	//     {
	//       path: 'purchasereport',
  //       alwaysShow: true,
	//       component: () => import('@/views/reportquery/purchasereport/index'),
	//       name: 'Purchasereport',
	//       meta: { title: '采购报表', noCache: true, roles: ['admin', 'editor'] },
  //       children: [
	// 			  {
	// 			    path: 'purchaseapplication',
	// 			    component: () => import('@/views/reportquery/purchasereport/purchaseapplication/index'),
	// 			    name: 'Purchaseapplication',
	// 			    meta: { title: '采购申请表', noCache: true, roles: ['admin', 'editor'] }
	// 			  }
  //       ]
	//     },
  //     {
	// 		  path: 'departmentalreport',
	// 			component: () => import('@/views/reportquery/departmentalreport/index'),
	// 		  name: 'Departmentalreport',
	// 		  meta: { title: '部门报表', noCache: true, roles: ['admin', 'editor'] },
  //       children: [
	// 			  {
	// 			    path: 'departmentdetails',
	// 			    component: () => import('@/views/reportquery/departmentalreport/departmentdetails/index'),
	// 			    name: 'Departmentdetails',
	// 			    meta: { title: '部门明细表', noCache: true, roles: ['admin', 'editor'] }
	// 			  },
  //         {
	// 				  path: 'maintenanceDetails',
	// 				  component: () => import('@/views/reportquery/departmentalreport/maintenanceDetails/index'),
	// 				  name: 'MaintenanceDetails',
	// 				  meta: { title: '维护明细表', noCache: true, roles: ['admin', 'editor'] }
  //         }
  //       ]
  //     },
  //     {
	// 		  path: 'inventoryreport',
	// 			component: () => import('@/views/reportquery/inventoryreport/index'),
	// 		  name: 'Inventoryreport',
	// 		  meta: { title: '库存报表', noCache: true, roles: ['admin', 'editor'] },
  //       children: [
	// 			  {
	// 			    path: 'inventorybalance',
	// 			    component: () => import('@/views/reportquery/inventoryreport/inventorybalance/index'),
	// 			    name: 'Inventorybalance',
	// 			    meta: { title: '库存余额表', noCache: true, roles: ['admin', 'editor'] }
	// 			  },
  //         {
	// 				  path: 'deliverydetails',
	// 				  component: () => import('@/views/reportquery/inventoryreport/deliverydetails/index'),
	// 				  name: 'Deliverydetails',
	// 				  meta: { title: '出库明细表', noCache: true, roles: ['admin', 'editor'] }
  //         },
  //         {
	// 				  path: 'warehousingdetails',
	// 				  component: () => import('@/views/reportquery/inventoryreport/warehousingdetails/index'),
	// 				  name: 'Warehousingdetails',
	// 				  meta: { title: '入库明细表', noCache: true, roles: ['admin', 'editor'] }
  //         }
  //       ]
  //     }
	//   ]
  // },
	/**
	 * 二维码管理路由模块
	 */
  ewmRouter,
  // 检测中心
  testingcenter,
  {
    path: '/keyProjects',
    component: Layout,
    redirect: '/dashboard',
    meta: { title: '重点项目', icon: 'zhongdian1', noCache: true,roles: ['admin', 'editor'] },
		alwaysShow: true,
    children: [
      {
        path: 'detail',
        component: () => import('@/views/keyProjects/detail/index'),
        name: 'Detail',
        meta: { title: '项目情况', noCache: true, roles: ['admin', 'editor'] }
      },
      {
        path: 'lookKeyProject',
        component: () => import('@/views/keyProjects/detail/lookKeyProject'),
        name: 'LookKeyProject',
        meta: { title: '查看项目情况', noCache: true, roles: ['admin', 'editor'], activeMenu: '/keyProjects/detail' },
        hidden: true
      },
			{
			  path: 'writeDetail',
			  component: () => import('@/views/keyProjects/detail/writeDetail'),
			  name: 'WriteDetail',
			  meta: { title: '编辑项目情况', noCache: true, activeMenu: '/keyProjects/detail', roles: ['admin', 'editor'] },
				hidden: true
			},
      {
        path: 'implement',
        component: () => import('@/views/keyProjects/implement/index'),
        name: 'Implement',
        meta: { title: '落实信息', noCache: true, activeMenu: '/keyProjects/detail', roles: ['admin', 'editor'] },
				hidden: true
      },
			{
			  path: 'writeImplement',
			  component: () => import('@/views/keyProjects/implement/writeImplement'),
			  name: 'WriteImplement',
			  meta: { title: '编辑落实信息', noCache: true, activeMenu: '/keyProjects/detail', roles: ['admin', 'editor'] },
				hidden: true
			},
      {
        path: 'progress',
        component: () => import('@/views/keyProjects/progress/index'),
        name: 'Progress',
        meta: { title: '进度完成情况', noCache: true, activeMenu: '/keyProjects/detail',  roles: ['admin', 'editor'] },
				hidden: true
      }
    ]
  },
  // {
  //   path: '/imgUpload',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/imgUpload/index'),
  //       name: 'ImgUpload',
  //       meta: { title: '验证图片管理', icon: 'imglist', noCache: true,roles: ['rsAdmin'] }
  //     }
  //   ]
  // },
  {
	  path: 'liuchengtu',
    component: Layout,
    alwaysShow: true,
		redirect: '/dashboard',
		meta: { title: '流程图', icon: 'liucheng' },
	  children: [
      {
		    path: '/liuchengtu',
		    component: () => import('@/views/liuchengtu/index'),
		    name: 'Liuchengtu',
		    meta: { title: '流程图', noCache: false,isNeedRefresh: true}
      },
      // {
		  //   path: '/editorliucheng',
		  //   component: () => import('@/views/liuchengtu/editorliucheng'),
		  //   name: 'Editorliucheng',
		  //   meta: { title: '编辑节点', noCache: true, roles: ['admin', 'editor'] }
      // },
		  {
		    path: '/writeliucheng',
		    component: () => import('@/views/liuchengtu/writeliucheng'),
		    name: 'Writeliucheng',
        meta: { title: '编辑流程图', noCache: true, activeMenu:'/liuchengtu' },
        hidden: true
		  },
			{
			  path: '/lookliucheng',
			  component: () => import('@/views/liuchengtu/lookliucheng'),
			  name: 'Lookliucheng',
			  meta: { title: '查看流程图', noCache: true, activeMenu:'/liuchengtu' },
				hidden: true
			},
	  ]
  },
  {
	  path: 'waimaodaoshi',
		component: Layout,
		redirect: '/dashboard',
		meta: { title: '外贸道氏', icon: 'daoshi', noCache: true, roles: ['wmAdmin'] },
	  children: [
      {
		    path: '/caigou',
		    component: () => import('@/views/waimaodaoshi/caigou'),
		    name: 'Daoshicaigou',
		    meta: { title: '采购信息', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writecaigou',
		    component: () => import('@/views/waimaodaoshi/writecaigou'),
		    name: 'WriteDaoshicaigou',
        meta: { title: '编辑采购', noCache: true, roles: ['wmAdmin'], activeMenu:'/caigou' },
        hidden: true
      },
      {
		    path: '/xiaoshou',
		    component: () => import('@/views/waimaodaoshi/xiaoshou'),
		    name: 'Daoshixiaoshou',
		    meta: { title: '销售信息', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writexiaoshou',
		    component: () => import('@/views/waimaodaoshi/writexiaoshou'),
		    name: 'WriteDaoshixiaoshou',
        meta: { title: '编辑销售', noCache: true, roles: ['wmAdmin'], activeMenu:'/xiaoshou' },
        hidden: true
      },
      {
		    path: '/yinhangin',
		    component: () => import('@/views/waimaodaoshi/yinhangin'),
		    name: 'Daoshiyinhangin',
		    meta: { title: '银行收入', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writeyinhangin',
		    component: () => import('@/views/waimaodaoshi/writeyinhangin'),
		    name: 'WriteDaoshiyinhangin',
        meta: { title: '编辑银行收入', noCache: true, roles: ['wmAdmin'], activeMenu:'/yinhangin' },
        hidden: true
      },
      {
		    path: '/yinhangout',
		    component: () => import('@/views/waimaodaoshi/yinhangout'),
		    name: 'Daoshiyinhangout',
		    meta: { title: '银行支出', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writeyinhangout',
		    component: () => import('@/views/waimaodaoshi/writeyinhangout'),
		    name: 'WriteDaoshiyinhangout',
        meta: { title: '编辑银行支出', noCache: true, roles: ['wmAdmin'], activeMenu:'/yinhangout' },
        hidden: true
      },
      {
		    path: '/maoli',
		    component: () => import('@/views/waimaodaoshi/maoli'),
		    name: 'Daoshimaoli',
		    meta: { title: '毛利表', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/daoshidetail',
		    component: () => import('@/views/waimaodaoshi/daoshidetail'),
		    name: 'Daoshidetail',
        meta: { title: '详情', noCache: true, roles: ['wmAdmin'] },
        hidden: true
      },
    ]
  },
  {
	  path: 'waimao',
		component: Layout,
		redirect: '/dashboard',
		meta: { title: '外贸提成', icon: 'waimao', noCache: true, roles: ['wmAdmin'] },
	  children: [
      {
		    path: '/baobiaofahuo',
		    component: () => import('@/views/waimao/baobiaofahuo/index'),
		    name: 'Baobiaofahuo',
		    meta: { title: '发货源数据报表', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writefhbaobiao',
		    component: () => import('@/views/waimao/baobiaofahuo/writefhbaobiao'),
		    name: 'Writefhbaobiao',
        meta: { title: '编辑发货报表', noCache: true, activeMenu:'/baobiaofahuo', roles: ['wmAdmin'] },
        hidden: true
      },
      {
		    path: '/baobiaohuikuan',
		    component: () => import('@/views/waimao/baobiaohuikuan/index'),
		    name: 'Baobiaohuikuan',
		    meta: { title: '回款源数据报表', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writebaobiaohuikuan',
		    component: () => import('@/views/waimao/baobiaohuikuan/writebaobiaohuikuan'),
		    name: 'Writebaobiaohuikuan',
        meta: { title: '编辑回款报表', noCache: true, roles: ['wmAdmin'],activeMenu:'/baobiaohuikuan' },
        hidden: true
      },
      {
		    path: '/fahuodan',
		    component: () => import('@/views/waimao/fahuodan/index'),
		    name: 'Fahuodan',
		    meta: { title: '发货单', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writefahuo',
		    component: () => import('@/views/waimao/fahuodan/writefahuo'),
		    name: 'Writefahuo',
        meta: { title: '编辑发货单', noCache: true, roles: ['wmAdmin'], activeMenu: '/fahuodan' },
        hidden: true
      },
      {
		    path: '/jisuanwaifahuo',
		    component: () => import('@/views/waimao/fahuodan/jisuanwaifahuo'),
		    name: 'Jisuanwaifahuo',
        meta: { title: '计算发货单', noCache: true, roles: ['wmAdmin'] },
        hidden: true
      },
		  {
		    path: '/huikuan',
		    component: () => import('@/views/waimao/huikuan/index'),
		    name: 'Huikuan',
        meta: { title: '回款单', noCache: true, roles: ['wmAdmin'] }
      },
      {
		    path: '/writehuikuan',
		    component: () => import('@/views/waimao/huikuan/writehuikuan'),
		    name: 'Writehuikuan',
        meta: { title: '编辑回款单', noCache: true, roles: ['wmAdmin'], activeMenu: '/huikuan' },
        hidden: true
      },
			{
			  path: '/yijisuan',
			  component: () => import('@/views/waimao/yijisuan/index'),
			  name: 'Yijisuan',
			  meta: { title: '已计算', noCache: true, roles: ['wmAdmin'] }
      },
      {
			  path: '/diqufenlei',
			  component: () => import('@/views/waimao/diqufenlei/index'),
			  name: 'Diqufenlei',
			  meta: { title: '地区分类', noCache: true, roles: ['wmAdmin'] }
      },
      {
			  path: '/huilv',
			  component: () => import('@/views/waimao/huilv/index'),
			  name: 'Huilv',
			  meta: { title: '汇率', noCache: true, roles: ['wmAdmin'] }
      },
      {
			  path: '/baozhuandanjia',
			  component: () => import('@/views/waimao/baozhuandanjia/index'),
			  name: 'Baozhuandanjia',
			  meta: { title: '包装单价', noCache: true, roles: ['wmAdmin'] }
      },
      {
			  path: '/jijia',
			  component: () => import('@/views/waimao/jijia/index'),
			  name: 'Jijia',
			  meta: { title: '基价数据', noCache: true, roles: ['wmAdmin'] }
      },
      {
			  path: '/huizong',
			  component: () => import('@/views/waimao/huizong/index'),
			  name: 'Huizong',
			  meta: { title: '汇总数据', noCache: true, roles: ['wmAdmin'] }
      }
	  ]
  },
  {
	  path: 'neimao',
		component: Layout,
		redirect: '/dashboard',
		meta: { title: '内贸提成', icon: 'neimao', noCache: true, roles: ['nmAdmin'] },
	  children: [
      {
		    path: '/neifahuo',
		    component: () => import('@/views/neimao/neifahuo/index'),
		    name: 'Neifahuo',
		    meta: { title: '发货单', noCache: true }
      },
      {
		    path: '/writeneifahuo',
		    component: () => import('@/views/neimao/neifahuo/writeneifahuo'),
		    name: 'Writeneifahuo',
        meta: { title: '编辑发货单', noCache: true, activeMenu:'/neifahuo' },
        hidden: true
      },
      {
			  path: '/jisuanneifahuo',
			  component: () => import('@/views/neimao/neifahuo/jisuanneifahuo'),
			  name: 'Jisuanneifahuo',
        meta: { title: '开始计算', noCache: true, activeMenu:'/neifahuo' },
        hidden: true
      },
		  {
		    path: '/neihuikuan',
		    component: () => import('@/views/neimao/neihuikuan/index'),
		    name: 'Neihuikuan',
        meta: { title: '回款单', noCache: true }
      },
      {
		    path: '/writeneihuikuan',
		    component: () => import('@/views/neimao/neihuikuan/writeneihuikuan'),
		    name: 'Writeneihuikuan',
        meta: { title: '编辑回款单', noCache: true, activeMenu:'/neihuikuan' },
        hidden: true
      },
			{
			  path: '/neijijia',
			  component: () => import('@/views/neimao/neijijia/index'),
			  name: 'Neijijia',
			  meta: { title: '基价信息', noCache: true }
      },
      // {
			//   path: '/neijijia2',
			//   component: () => import('@/views/neimao/neijijia2/index'),
			//   name: 'Neijijia2',
			//   meta: { title: '基价信息2', noCache: true }
      // },
      {
			  path: '/neibaozhuang',
			  component: () => import('@/views/neimao/neibaozhuang/index'),
			  name: 'Neibaozhuang',
			  meta: { title: '包装信息', noCache: true }
      },
      {
			  path: '/kehuyue',
			  component: () => import('@/views/neimao/kehuyue/index'),
			  name: 'Kehuyue',
			  meta: { title: '客户余额', noCache: true }
      },
      {
			  path: '/neiyijisuan',
			  component: () => import('@/views/neimao/neiyijisuan/index'),
			  name: 'Neiyijisuan',
			  meta: { title: '已计算', noCache: true }
      },
      {
			  path: '/lookneiyijisuan',
			  component: () => import('@/views/neimao/neiyijisuan/index'),
			  name: 'Lookneiyijisuan',
        meta: { title: '查看详情', noCache: true },
        hidden: true
      },
      {
			  path: '/neiyidayin',
			  component: () => import('@/views/neimao/neiyidayin/index'),
			  name: 'Neiyidayin',
			  meta: { title: '已打印', noCache: true }
      },
      {
			  path: '/neidayinbujisuan',
			  component: () => import('@/views/neimao/neidayinbujisuan/index'),
			  name: 'Neidayinbujisuan',
			  meta: { title: '已计算不打印', noCache: true }
      },
      {
			  path: '/neijisuanxishu',
			  component: () => import('@/views/neimao/neijisuanxishu/index'),
			  name: 'Neijisuanxishu',
			  meta: { title: '计算系数', noCache: true }
      },
      {
			  path: '/daochu',
			  component: () => import('@/views/neimao/daochu/index'),
			  name: 'Daochu',
			  meta: { title: '导出列表', noCache: true }
      },
      {
			  path: '/lookneidetail',
			  component: () => import('@/views/neimao/lookneidetail/index'),
			  name: 'Lookneidetail',
        meta: { title: '查看', noCache: true },
        hidden: true
      }
	  ]
  },
  {
	  path: 'anquan',
		component: Layout,
		redirect: '/dashboard',
		meta: { title: '食品安全', icon: 'anquan', noCache: true,roles: ['admin', 'editor','rsAdmin'] },
	  children: [
      {
			  path: '/shipinanquan',
			  component: () => import('@/views/shipinanquan/problem/index'),
			  name: 'Shipinanquan',
        meta: { title: '班组履职', noCache: true }
      },
      {
			  path: '/chejian',
			  component: () => import('@/views/shipinanquan/chejian/index'),
			  name: 'Chejian',
        meta: { title: '车间履职', noCache: true }
      },
      {
			  path: '/submitproblem',
			  component: () => import('@/views/shipinanquan/submitproblem/index'),
			  name: 'Submitproblem',
        meta: { title: '问题项', noCache: true }
      },
      {
			  path: '/zongjianlvzhi',
			  component: () => import('@/views/shipinanquan/zongjian/zongjianlvzhi'),
			  name: 'Zongjianlvzhi',
        meta: { title: '总监履职', noCache: true },
      },
      {
			  path: '/zjgswenti',
			  component: () => import('@/views/shipinanquan/zongjian/zjgswenti'),
			  name: 'Zjgswenti',
        meta: { title: '问题项', noCache: true },
        hidden: true
      },
      {
			  path: '/writezjgswenti',
			  component: () => import('@/views/shipinanquan/zongjian/writezjgswenti'),
			  name: 'Writezjgswenti',
        meta: { title: '编辑问题项', noCache: true },
        hidden: true
      },
      {
			  path: '/zongjian',
			  component: () => import('@/views/shipinanquan/zongjian/index'),
			  name: 'Zongjian',
        meta: { title: '总监履职项', noCache: true },
        hidden: true
      },
      {
			  path: '/gongsiwenti',
			  component: () => import('@/views/shipinanquan/gongsi/gongsiwenti'),
			  name: 'Gongsiwenti',
        meta: { title: '公司履职', noCache: true },
      },
      // {
			//   path: '/gongsilvzhi',
			//   component: () => import('@/views/shipinanquan/gongsi/gongsilvzhi'),
			//   name: 'Gongsilvzhi',
      //   meta: { title: '公司履职', noCache: true },
      // },
      {
			  path: '/gongsi',
			  component: () => import('@/views/shipinanquan/gongsi/index'),
			  name: 'Gongsi',
        meta: { title: '公司监管', noCache: true },
      },
      {
			  path: '/writezongjian',
			  component: () => import('@/views/shipinanquan/zongjian/writezongjian'),
			  name: 'Writezongjian',
        meta: { title: '编辑总监履职', noCache: true, activeMenu:'/zongjian' },
        hidden: true
      },
      {
			  path: '/wirteproblem',
			  component: () => import('@/views/shipinanquan/submitproblem/wirteproblem'),
			  name: 'Writeproblem',
        meta: { title: '编辑问题项', noCache: true },
        hidden: true
      },
      {
			  path: '/problemlist',
			  component: () => import('@/views/shipinanquan/submitproblem/problemlist'),
			  name: 'Problemlist',
        meta: { title: '查看问题项', noCache: true },
        hidden: true
      },
      {
			  path: '/lookproblem',
			  component: () => import('@/views/shipinanquan/submitproblem/lookproblem'),
			  name: 'Lookproblem',
        meta: { title: '问题项详情', noCache: true },
        hidden: true
      },
      {
			  path: '/anquanProblem',
			  component: () => import('@/views/shipinanquan/problem/anquanProblem'),
			  name: 'AnquanProblem',
        meta: { title: '管理问题', noCache: true },
        hidden: true
      },
      {
			  path: '/chuli',
			  component: () => import('@/views/shipinanquan/problem/chuli'),
			  name: 'Chuli',
        meta: { title: '处理问题', noCache: true },
        hidden: true
      },
      {
			  path: '/lvzhi',
			  component: () => import('@/views/shipinanquan/problem/lvzhi'),
			  name: 'Lvzhi',
        meta: { title: '履职问题', noCache: true },
        hidden: true
      },
      {
			  path: '/writelvzhi',
			  component: () => import('@/views/shipinanquan/problem/writelvzhi'),
			  name: 'Writelvzhi',
        meta: { title: '编辑履职问题', noCache: true },
        hidden: true
      },
      {
			  path: '/renyuan',
			  component: () => import('@/views/shipinanquan/people/index'),
			  name: 'Renyuan',
        meta: { title: '人员管理', noCache: true }
      },
      {
			  path: '/zongjianguanli',
			  component: () => import('@/views/shipinanquan/people/zongjianguanli'),
			  name: 'Zongjianguanli',
        meta: { title: '总监管理', noCache: true }
      },
      {
			  path: '/peoplerole',
			  component: () => import('@/views/shipinanquan/people/peoplerole'),
			  name: 'Peoplerole',
        meta: { title: '人员权限管理', noCache: true }
      },
      {
			  path: '/wentiguanli',
			  component: () => import('@/views/shipinanquan/problem/wentiguanli'),
			  name: 'Wentiguanli',
        meta: { title: '问题分类管理', noCache: true }
      },
      {
			  path: '/writerenyuan',
			  component: () => import('@/views/shipinanquan/people/writepeople'),
			  name: 'Writerenyuan',
        meta: { title: '编辑人员管理', noCache: true, activeMenu:'/renyuan' },
        hidden: true
      },
      {
			  path: '/anquandaochu',
			  component: () => import('@/views/shipinanquan/daochu/index'),
			  name: 'Anquandaochu',
        meta: { title: '导出管理', noCache: true }
      },
	  ]
  },
  {
	  path: 'more',
		component: Layout,
		redirect: '/dashboard',
		meta: { title: '更多管理', icon: 'more', noCache: true},
	  children: [
      {
		    path: '/toupiao',
		    component: () => import('@/views/more/toupiao/index'),
		    name: 'Toupiao',
		    meta: { title: '投票管理', noCache: true, roles: ['tpAdmin'] }
      },
      {
		    path: '/writetoupiao',
		    component: () => import('@/views/more/toupiao/writetoupiao'),
		    name: 'Writetoupiao',
        meta: { title: '编辑投票', noCache: true, roles: ['tpAdmin'] },
        hidden:true
      },
      {
		    path: '/toupiaoset',
		    component: () => import('@/views/more/toupiao/toupiaoset'),
		    name: 'Toupiaoset',
		    meta: { title: '投票设置', noCache: true, roles: ['tpAdmin'] }
      },
      {
		    path: '/writetoupiaoset',
		    component: () => import('@/views/more/toupiao/writetoupiaoset'),
		    name: 'Writetoupiaoset',
        meta: { title: '编辑投票设置', noCache: true, roles: ['tpAdmin'], activeMenu:'/toupiaoset' },
        hidden:true
      },
      {
		    path: '/toupiaoresult',
		    component: () => import('@/views/more/toupiao/toupiaoresult'),
		    name: 'Toupiaoresult',
        meta: { title: '投票结果', noCache: true, roles: ['tpAdmin'], activeMenu:'/toupiaoset' }
      },
		  {
		    path: '/readilytake',
		    component: () => import('@/views/more/readilytake/index'),
		    name: 'Readilytake',
		    meta: { title: '随手拍', noCache: true, roles: ['admin', 'editor'] }
		  },
			{
			  path: '/writereadilytake',
			  component: () => import('@/views/more/readilytake/writereadilytake'),
			  name: 'Writereadilytake',
			  meta: { title: '编辑随手拍', noCache: true, activeMenu: '/readilytake' },
				hidden: true
			},
			{
			  path: '/ideaBox',
			  component: () => import('@/views/more/ideaBox/index'),
			  name: 'IdeaBox',
			  meta: { title: '意见箱', noCache: true, roles: ['admin', 'editor'] }
			},
			{
			  path: '/classroom',
			  component: () => import('@/views/more/classroom/index'),
			  name: 'Classroom',
			  meta: { title: '职教室', noCache: true, roles: ['admin', 'editor'] }
      },
      {
			  path: '/xcxproduct',
			  component: () => import('@/views/more/xcxproduct/index'),
			  name: 'Xcxproduct',
			  meta: { title: '小程序商品', noCache: true, roles: ['admin', 'editor'] }
      },
      {
			  path: '/writexcxproduct',
			  component: () => import('@/views/more/xcxproduct/writexcxproduct'),
			  name: 'Writexcxproduct',
        meta: { title: '编辑商品', noCache: true, roles: ['admin', 'editor'] },
        hidden: true
      }
	  ]
  },
	{
		path: 'lookdetail',
		component: () => import('@/views/lookdetail/index'),
		name: 'Lookdetail',
		meta: {title: '查看详情',noCache: true,roles: ['rsAdmin','rsEditor']},
		hidden: true
  },
  {
    path: '/neidayin',
    component: () => import('@/views/neimao/neidayin/index'),
    name: 'Neidayin',
    meta: { title: '打印', noCache: true, roles: ['nmAdmin'] },
    hidden: true
  },
  
  /** 当你的路由图太长时，你可以把它分成几个小模块 **/
  // componentsRouter,
  // chartsRouter,
  // nestedRouter,
  // tableRouter,

  // {
  //   path: '/example',
  //   component: Layout,
  //   redirect: '/example/list',
  //   name: 'Example',
  //   meta: {
  //     title: 'example',
  //     icon: 'example'
  //   },
  //   children: [
  //     {
  //       path: 'create',
  //       component: () => import('@/views/example/create'),
  //       name: 'CreateArticle',
  //       meta: { title: 'createArticle', icon: 'edit' }
  //     },
  //     {
  //       path: 'edit/:id(\\d+)',
  //       component: () => import('@/views/example/edit'),
  //       name: 'EditArticle',
  //       meta: { title: 'editArticle', noCache: true, activeMenu: '/example/list' },
  //       hidden: true
  //     },
  //     {
  //       path: 'list',
  //       component: () => import('@/views/example/list'),
  //       name: 'ArticleList',
  //       meta: { title: 'articleList', icon: 'list' }
  //     }
  //   ]
  // },

  // {
  //   path: '/tab',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/tab/index'),
  //       name: 'Tab',
  //       meta: { title: 'tab', icon: 'tab' }
  //     }
  //   ]
  // },

  // {
  //   path: '/error',
  //   component: Layout,
  //   redirect: 'noRedirect',
  //   name: 'ErrorPages',
  //   meta: {
  //     title: 'errorPages',
  //     icon: '404'
  //   },
  //   children: [
  //     {
  //       path: '401',
  //       component: () => import('@/views/error-page/401'),
  //       name: 'Page401',
  //       meta: { title: 'page401', noCache: true }
  //     },
  //     {
  //       path: '404',
  //       component: () => import('@/views/error-page/404'),
  //       name: 'Page404',
  //       meta: { title: 'page404', noCache: true }
  //     }
  //   ]
  // },

  // {
  //   path: '/error-log',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'log',
  //       component: () => import('@/views/error-log/index'),
  //       name: 'ErrorLog',
  //       meta: { title: 'errorLog', icon: 'bug' }
  //     }
  //   ]
  // },

  // {
  //   path: '/excel',
  //   component: Layout,
  //   redirect: '/excel/export-excel',
  //   name: 'Excel',
  //   meta: {
  //     title: 'excel',
  //     icon: 'excel'
  //   },
  //   children: [
  //     {
  //       path: 'export-excel',
  //       component: () => import('@/views/excel/export-excel'),
  //       name: 'ExportExcel',
  //       meta: { title: 'exportExcel' }
  //     },
  //     {
  //       path: 'export-selected-excel',
  //       component: () => import('@/views/excel/select-excel'),
  //       name: 'SelectExcel',
  //       meta: { title: 'selectExcel' }
  //     },
  //     {
  //       path: 'export-merge-header',
  //       component: () => import('@/views/excel/merge-header'),
  //       name: 'MergeHeader',
  //       meta: { title: 'mergeHeader' }
  //     },
  //     {
  //       path: 'upload-excel',
  //       component: () => import('@/views/excel/upload-excel'),
  //       name: 'UploadExcel',
  //       meta: { title: 'uploadExcel' }
  //     }
  //   ]
  // },

  // {
  //   path: '/zip',
  //   component: Layout,
  //   redirect: '/zip/download',
  //   alwaysShow: true,
  //   name: 'Zip',
  //   meta: { title: 'zip', icon: 'zip' },
  //   children: [
  //     {
  //       path: 'download',
  //       component: () => import('@/views/zip/index'),
  //       name: 'ExportZip',
  //       meta: { title: 'exportZip' }
  //     }
  //   ]
  // },

  // {
  //   path: '/pdf',
  //   component: Layout,
  //   redirect: '/pdf/index',
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/pdf/index'),
  //       name: 'PDF',
  //       meta: { title: 'pdf', icon: 'pdf' }
  //     }
  //   ]
  // },
  // {
  //   path: '/pdf/download',
  //   component: () => import('@/views/pdf/download'),
  //   hidden: true
  // },

  // {
  //   path: '/theme',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/theme/index'),
  //       name: 'Theme',
  //       meta: { title: 'theme', icon: 'theme' }
  //     }
  //   ]
  // },

  // {
  //   path: '/clipboard',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/clipboard/index'),
  //       name: 'ClipboardDemo',
  //       meta: { title: 'clipboardDemo', icon: 'clipboard' }
  //     }
  //   ]
  // },

  // {
  //   path: '/i18n',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/i18n-demo/index'),
  //       name: 'I18n',
  //       meta: { title: 'i18n', icon: 'international' }
  //     }
  //   ]
  // },

  // {
  //   path: 'external-link',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'https://github.com/PanJiaChen/vue-element-admin',
  //       meta: { title: 'externalLink', icon: 'link' }
  //     }
  //   ]
  // },

  // 404 page must be placed at the end !!!
  { path: '*', redirect: '/404', hidden: true }
]

const createRouter = () => new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router
